#[macro_use]
extern crate log;

use env_logger::Builder;
//use log::LevelFilter;

use std::{env, io::Write, time::Instant};

mod utils;

fn main() {
    let mut builder = Builder::from_default_env();
    builder
        .format(|buf, record| writeln!(buf, "{} - {}", record.level(), record.args()))
        //.filter(None, LevelFilter::Trace)
        .init();

    let start = Instant::now();
    let args = env::args().collect::<Vec<String>>();
    debug!("{:?}", args);
    if args.len() < 3 {
        return;
    }

    let _ = utils::compare_ab_diff(&args[1], &args[2]);
    debug!("Tip : 运行耗时 {:?}", start.elapsed());
}
